<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>支付成功.</title>
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://api.uu235.com/web/front/static/css/style.css" />
</head>
<body>

<div id="wrap">
	<div class="center">
		<!--header-->
		<header style=" color: #666; background: #fff; display: none;">
			<div @click="back">
				<i class="iconfont icon-xiangzuo"></i>
			</div>
			<div class="search-box text-left">
				支付成功
			</div>
			<div></div>
		</header>
		<div class="main-content" style="margin-top: 0px; padding-top: 0px;">
			<div style=" padding: 2rem; color: #fff;background: rgb(208,46,62); text-align: center;">
				<div style=" display: flex;">
					<i class="iconfont icon-duihao" style=" flex: 2; text-align: right; font-size: 3rem;"></i>
					<div style=" flex: 3; text-align: left; padding-left: 1rem;">
						<p style=" font-size: 1.5rem;">支付成功!</p>
						<p style=" font-size: 1rem;">感谢您的购买</p>
					</div>
				</div>
			</div>
			<div v-if="isVisibile">
				<img src="https://api.uu235.com/images/libao.png" style="width:100%;max-width:100%;" />
			</div>
			<div style="position: absolute;width:100%;bottom:0;left:0; text-align: center; font-size:14px; line-height: 250%;" v-if="isVisibile">
				<p>您的礼包已成功支付</p>
				<p>请点击下方按钮馈赠亲友</p>
			</div>
		</div>				
	</div>
</div>
<script>
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }
    var vm = new Vue({
        el: '#wrap',
        data: {
            isVisibile:false,
            shareVisible: false,
            order_no: getUrlParam('order_no')
        },
        mounted:function () {
            this.getOrderDetail(getUrlParam('order_no'))
        },
        methods: {
            back:function () {
                window.location.href = 'https://api.uu235.com/web/front/#/center'
            },
            getOrderDetail:function (id) {
				var token = getUrlParam('token');
				if(!token){
					token = localStorage.getItem('token');
				}
                var _this = this;
                $.ajax({
                    url: 'https://api.uu235.com/user/ordersdetail',
                    type: 'post',
                    data: {
                        token: token,
                        order_no :id
                    },
                    success: function(data){
                        if(data.ret == 0) {
                            if(data.data.shipping_type == 2) {
                                _this.isVisibile = true
                            }else {
                                window.location.href = 'https://api.uu235.com/web/front/#/myOrder'
                            }
                        }
                    }
                })
            }
        }
    })
</script>

</body></html>
